Innoventum.fi
Object model (O)
The Object relational mapping model relies on an Object Factory for instantiating new objects based on their object descriptions stored in the Data Model and assigns database connections to them.
The factory is used via the O class.
Objects can be single objects or lists thereof, which is usully denoted by appending 'list' to the objectname.
Object classes inherit their functionality from Object(List)Manager and their properties and their storage methods are defined in the Data Model, which in turn is edited via the Datamodel editor. Internally it is accessed via the object's ObjectDescription property.
Objects may also extend their functionality with new methods by introducing their own class descriptions, either in the icms system context under applications/icms/[currentversion]/managers or locally to the project under php/
These classes in turn extend the ObjectManager or CacheableObjectManager and should be included using irequire() method before instantiating for the first time by the ObjectFactory - ObjectFactory does autoloading of the object descriptions only when the object is not found from the Datamodel database.
Instantiating objects
O::get("objecttype"[,database connection] [,logfile]);
Instantiates a new object of type objecttype with the current default database connection. An alternative database connection can be passed as object or databaseconnection name if needed.
O::load("objecttype",[filters] [,database connection] [,logfile]);
Instantiates and load a new object or list of objects of given objecttype, using the given (array of) filters.
Examples
No pages available.